@extends('model/admin')
@section('title','编辑商品分类')

@section('content')
	@if (count($errors) > 0)
	<div class="mws-form-message error">
    	This is an error message
        <ul>
        	 @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
    @endif
	<div class="mws-panel grid_8">
    	<div class="mws-panel-header">
        	<span>编辑类别</span>
        </div>
        <div class="mws-panel-body no-padding">
        	<form class="mws-form" action="/admin/goodstype" method='post'>
        			<div class="mws-form-row">
        				<label class="mws-form-label">类别名称</label>
        				<div class="mws-form-item">
        					<input class="small" type="text" value="{{$res['name']}}" name='name'>
        				</div>
        			</div>
        			<input type="hidden" name='id' value="{{$res['id']}}">
        		{{csrf_field()}}
        		<div class="mws-button-row">
        			<input value="确认修改" class="btn btn-danger" type="submit">
        			<a href="/admin/goodstype/create?id={{$res['id']}}" class="btn btn-primary">添加子分类</a> 
        			<input value="放弃修改" class="btn " type="reset">

        		</div>
        	</form>
        </div>
    </div>

@endsection